package tuanda.soict.firstsun.ClickListenerPackage;

import tuanda.soict.firstsun.LogicPackage.Army;
import tuanda.soict.firstsun.PresentationPackage.ControlMenu;
import tuanda.soict.firstsun.PresentationPackage.GeneralConstants;
import tuanda.soict.firstsun.PresentationPackage.TiledMapRendererScreen;

import com.badlogic.gdx.scenes.scene2d.Actor;

public class ArmyAbilityClickListener extends
		AbstractClickListener implements GeneralConstants {

	private TiledMapRendererScreen tileScreen;
	private ControlMenu controlMenu;
	private Army army;

	public ArmyAbilityClickListener(int id,
			TiledMapRendererScreen tScreen, ControlMenu cMenu, Army arm) {
		super(id);
		setTileScreen(tScreen);
		setControlMenu(cMenu);
		setArmy(arm);
	}

	@Override
	public void click(Actor actor, float x, float y) {
		tileScreen.setScreenState(ABILITY_SCREEN);
		controlMenu.setAbilityIndex(ID);
		controlMenu.createSkillScreen(army);
	}

	public TiledMapRendererScreen getTileScreen() {
		return tileScreen;
	}

	public void setTileScreen(TiledMapRendererScreen tileScreen) {
		this.tileScreen = tileScreen;
	}

	public ControlMenu getControlMenu() {
		return controlMenu;
	}

	public void setControlMenu(ControlMenu controlMenu) {
		this.controlMenu = controlMenu;
	}

	public Army getArmy() {
		return army;
	}

	public void setArmy(Army army) {
		this.army = army;
	}
}
